package com.zhh.front.view.center;

import com.zhh.api.model.BidInfo;
import org.apache.commons.lang3.time.DateFormatUtils;

import java.math.BigDecimal;
import java.util.Date;

public class InvestResultView {
    private Integer id;
    private String product; //项目名称
    private BigDecimal investMoney; //投资金额
    private String investDate; //投资日期

    public InvestResultView(Integer id, Integer product, BigDecimal investMoney, Date investDate) {
        this.id = id;

        this.investMoney = investMoney;//投资金额

        if(investDate != null){
            this.investDate = DateFormatUtils.format(investDate,"yyyy-MM-dd");//投资时间
        }

        switch(product){//投资产品
            case 0:
                this.product = "新手宝";
                break;
            case 1:
                this.product = "优选产品";
                break;
            case 2:
                this.product = "散标产品";

        }
    }


    public Integer getId() {
        return id;
    }

    public String getProduct() {
        return product;
    }

    public BigDecimal getInvestMoney() {
        return investMoney;
    }

    public String getInvestDate() {
        return investDate;
    }
}
